The present invention relates to an image processing method for measuring the area, dimensions and others of each of particle images (that is, clumps) appearing on a picture image and an apparatus for carrying out the image processing method, and more particularly to an image processing method and an image processing apparatus suitable for use in an automatic image analysis system and an automatic pattern-defect inspection system.
With the recent increase in the integration density of a printed circuit board and a semiconductor circuit, an automatic visual inspection system has been earnestly developed which can automatically inspect fine pattern defects generated in fabricating the printed circuit board or semiconductor circuit, with the aid of image processing techniques. That is, owing to the increase in the integration density, it has become very difficult to visually inspect the above pattern defects. Hence, the automatic visual inspection system which can make the above inspection in place of human eyes, is very important. In order to prevent the false alarm due to pattern noise and ensure the reliability of the automatic pattern-defect inspection, it is necessary to use image processing techniques for measuring the position, dimensions, area and others of each of defect images which are obtained by defect extraction processing and indicated by a logical value "1", and for judging whether or not each defect image indicates a true defect, on the basis of the measured values. As to techniques for analyzing clumps which appear in a binary image and have a logical value "1", and for measuring the position, dimensions, area and others of each clump, many methods have been developed in the name of digital image analysis method. In order to use these methods in the automatic pattern inspection, the methods are required to carry out real-time processing. The reason for this is as follows. For example, in a case where a body to be inspected moves at a constant speed and is imaged continuously by a one-dimensional line sensor, input images are continuously applied to an inspection system by a raster scan method for a long time, and each input image contains a vast amount of data. Hence, it is very difficult to store the input images in an image memory and to process the images read out from the image memory, as in a conventional system. Thus, it is necessary to use a real-time one-pass technique, in which input images are continuously applied to an inspection system by a raster scan method, and the processing for a defect image is completed each time the defect image appears on the input images. In conventional digital image analysis, a labeling method, a tracking method and improved methods thereof have been used. In each of these methods, however, it is required to store an input image corresponding to the whole area of a display screen or an equivalent feature data in a memory. Thus, the above methods cannot be used for high-speed inspection.
The basic difficulty of the real-time, one-pass processing for input images formed by a raster scan method is based upon the variations in shape of clumps appearing on a binary image. In a case where all the clumps have convex surfaces, the processing for each clump is relatively simple. For example, in a case where a clump has the form of a spiral, it is difficult to check the continuity between those portions of the clump which intersect with one scanning line (hereinafter referred to as "intersecting portions"), and thus the processing for the clump becomes difficult. In order to solve this difficulty, the following method has been proposed. (1) The end of each intersecting portion on a scanning line is so deformed as to reach a more extending one of the end of the intersecting portion and the deformed end of a corresponding, intersecting portion on a preceding scanning line.
(2) When the end of the intersecting portion is deformed as mentioned above, a feature value of clump calculated up to the present scanning line is applied to a one-scanning-line delay circuit. A feature value due to a corresponding, intersecting portion on the next scanning line is added to the feature value outputted from the delay circuit, and the feature value thus modified is applied to the delay circuit after the end of the corresponding, intersecting portion has been deformed.
(3) The above operation is repeated and feature values are summed up till the final intersecting portion of each clump is deformed. Then, the feature value of each clump thus obtained is delivered to the outside. This method is described in U.S. Pat. No. 3,619,494.